﻿@model IEnumerable<Modelo.Empresa>

@{
    ViewBag.Title = "Empresas";
}

<p class="h5Nuevo">
    @Html.ActionLink("Crear nueva Empresa", "Create")
</p>
<table class="tabla">
    <tr>
        <th>
            @Html.DisplayNameFor(model => model.Codigo)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.Nombre)
        </th>
    </tr>

    @foreach (var item in Model)
    {
        <tr>
            <td>
                @Html.DisplayFor(modelItem => item.Codigo)
            </td>
            <td>
                @Html.DisplayFor(modelItem => item.Nombre)
            </td>
            <td>
                <div class="btn-group">
                    <button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">
                        Acciones <span class="caret"></span>
                    </button>
                    <ul class="dropdown-menu" role="menu">
                        <li>@Html.ActionLink("Editar", "Edit", new { id = item.Id })</li>
                        <li class="divider"></li>
                        <li>@Html.ActionLink("Detalles", "Details", new { id = item.Id })</li>
                        <li class="divider"></li>
                        <li>@Html.ActionLink("Eliminar", "Delete", new { id = item.Id })</li>
                    </ul>
                </div>
            </td>
        </tr>
    }
</table>
<h5>
    @Html.ActionLink("Volver", "Index", "Home")
</h5>
